package com.jjc.android.adapter

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentPagerAdapter


class SimpleFragmentPagerAdapter(fm: FragmentManager,var fragments:List<Fragment>,var tabTitles:List<String>?=null): FragmentPagerAdapter(fm){

    override fun getPageTitle(position: Int): CharSequence? {
        return tabTitles?.get(position)
    }

    override fun getItem(position: Int): Fragment {
        return fragments[position]
    }

    override fun getCount(): Int {
        return fragments.size
    }

}